1. Start
  2. Requirements
  3. Setup
  4. Database Setup
  5. Super-User Creation
  6. Mochi Media Integration
  7. User Groups
  8. User Points & Levels
  9. Translating
  10. Custom Theme

Arcade Management System Documentation

Version 1.2.0


Requirements


  1. PHP 5.3
  2. A database with the PHP PDO extension enabled

Setup


  1. Upload the downloaded files on a web hosting of your choice
  2. Give write permissions to /cache/ and /public/db/ folders (usually chmod 755 or 777 if that doesn't work)
  3. Open your browser and navigate to the site
  4. You should see the Arcade Database Setup screen

Database Setup


  1. Driver: your database type (most commonly MySQL or PostgreSQL)
  2. Host: the database server host (usually 127.0.0.1, if not, consult your hosting)
  3. Username & password: database user and password that your host should provide
  4. Database: name of the database you want to use
  5. Prefix: this will be prepended to all of the table names that the script creates in the database, this is useful if you only have one database and use it for multiple sites

If you've already run the setup and want to change database settings, edit the cache/db.php file. If you are changing the database, you have to copy the data from your old database to your new one manually.

Super-User Creation


Once you finish the database setup, you will be prompted to create a user account. The account you create now is the most privileged user on the site, it has access to the administration and can create other administrators. Once you finish this step, you'll be on the home page logged in as the owner.

When logged in as the owner, you'll notice an administration link in the top navigation. From there you can make modifications to your site. You should start from the Settings tab, where you can set the title and the timezone.

Mochi Media Integration


If you'd like to enable the leaderboard for Mochi Media games and potentially earn revenue from hosting the games, you have to create a free Mochi Media account. Once you've logged in to Mochi Media, enter the publishers tab and copy your publisher ID and publisher secret key to the appropriate fields in the Settings tab in administration.

You also have to verify your domain with Mochi Media, follow the steps in the publisher tab in Mochi Media (copy the verification code into the field in Arcade settings administration).

Adding Mochi Media games to your site is easy - select the Games tab and press the Fetch games button in the top navigation. You'll have to set a limit and an offset. The limit dictates how many games should be downloaded, don't set it too high as the process may take a while. The offset is used for fetching older games. For example, if the offset is 5 then the loader skips the newest 5 games and starts fetching from there.

To browse the Mochi Media catalog for games and post them to your site, you have to edit the publisher settings on Mochi Media and set the settings as such:

  1. Auto post method: Custom built script
  2. Auto post URL: http://your-site-url.com/fetch/{publisher secret key}

You can get the publisher secret key on the same settings page on Mochi Media. Here is an example URL:
http://summoner.eu/fetch/p457lkdnghldfngse5po6serdtkisdfg

You are now ready to post games directly to your site!

User Groups


You can ban or promote users to moderators or administrators in the Users tab in administration.

  1. Owner: the first account you create during setup; has all the privileges
  2. Administrator: has access to the administration, but cannot view the Settings nor Advertisements tabs
  3. Moderator: cannot access the administration, but has privileges on the site (deleting comments)
  4. User: doesn't have any special privileges, this is the default group
  5. Banned: cannot log in to the site

User Points & Levels


Every user starts out as level 1 upon registration. They can earn experience and levels through various actions:

When a user plays a game with the leaderboard enabled and submits a score, the user gets as many points as the number of other players (s)he beat. For example, if a user ranks third in a game that has 10 score submissions, the user receives 7 points.

To reach level 2, a user has to earn 50 points. As the level increments, so does the amount of points needed to reach the next level by 50. On the users page, you can order users by how many points they've collected in a certain time period. Each user can also see how they rank on the sidebar.

Translating


  1. Create a new folder in the /lang/ folder and name it the ISO code of your language, such as en for English or de for German.
  2. Copy all of the files from /lang/en/ and /fw/lang/en/ into your new language folder.
  3. In lang.yml, set name equal to the name of the language in that language. For example, English in English or Deutsch in German.
  4. You can translate the site in all of the other files in the folder.
  5. To activate the new language, navigate to the Settings tab in administration and select it from the drop-down menu.

Custom Theme


  1. Make a copy of the default folder in /public/template/ and rename it to what your theme is called.
  2. Open theme.yml in the new folder and set name to your theme's name. You can also directly change colours in the theme.yml file.
  3. Overwrite the image files in your theme's folder with images that go with your theme.
  4. To activate your new theme, enter the Settings tab in administration and set it as the template.

If you'd like to make changes to the HTML files in the /view/ folder, open index.php and change line 5 to:

Pawn::init('development');

Once you've finished making modifications, don't forget to set it back to:

Pawn::init('production');